/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package MortgageCore;
import simframe.simulation.*;

/**
 *
 * @author karakots
 */
public interface iLender {
    //
    // iLender Interface
    //
    void offerMortgages();

    // needs to be an action because it triggers a call to the borrower
    Action preApproveMortgage(MortgageOffer offer, iBuyerSeller borrower);

    // buyer has pre-approved mortgage and is ready to buy a specfiic house
    // should be an action because it calls back to the mortgage
    Action requestFunding(Mortgage mortgage, double requestedAmount);

    // borrower is making a mortgage payment, but the mortgage sends it to the lender
    // because the mortgage may be sold, and the borrower does not need to know who now
    // holds the mortgage
    void payment(double amount, double principal);

    void payPoints(double amount);

    void missedPayment();

    // the borrower can no longer aford the mortage,and will stop paying
    // the lender gets the house
    void defaultOnMortgage(int accountNumber);

    // the mortgage is completely paid off
    void paidInFull();
}
